package com.linkgap.cloud.entity.sys;

import java.util.ArrayList;
import java.util.List;

public class TestAuth {


    public static void main(String[] args) {

        TestAuth auth = new TestAuth();
        List<User> aaa = auth.getUserByNameLike("aaa");
        System.out.println(aaa);


    }


    private static List<User> getUserByNameLike(String username) {

        return null;
    }


    private List<RoleMappingMenu> roleMappingMenuList() {

        return new ArrayList<>();
    }


    private List<UserMappingRole> userMappingRoleList() {

        List<UserMappingRole> userMappingRoleList = new ArrayList<>();
        UserMappingRole mapping = new UserMappingRole();
        mapping.setId(1L);
        mapping.setUserId(1L);
        mapping.setRoleId(1L);

        userMappingRoleList.add(mapping);

        //
        return userMappingRoleList;

    }


    private List<Menu> mockMenu() {

        List<Menu> res = new ArrayList<>();

        Menu m = new Menu();
        m.setId(1L);
        m.setName("menu1");
        res.add(m);

        m = new Menu();
        m.setId(2L);
        m.setName("menu2");
        res.add(m);

        for (int i = 0; i < 10; i++) {
            m = new Menu();
            m.setId(i + 3L);
            m.setName("menu" + i + 3);
            res.add(m);
        }
        return res;
    }


    private List<Role> mockRoleList() {

        List<Role> res = new ArrayList<>();

        Role a = new Role();
        a.setId(1L);
        a.setName("学生");
        res.add(a);

        a = new Role();
        a.setId(2L);
        a.setName("老师");
        res.add(a);

        a = new Role();
        a.setId(3L);
        a.setName("管理员");
        res.add(a);

        return res;
    }


    private List<User> mockUserList() {

        List<User> list = new ArrayList<>();

        //学生
        User a = new User();
        a.setId(1L);
        a.setName("学生张三");

        list.add(a);

        a = new User();
        a.setId(2L);
        a.setName("老师李四");

        list.add(a);

        a = new User();
        a.setId(3L);
        a.setName("管理员王五");

        list.add(a);
        return list;

    }

}
